home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / utils / lpansi / lpansi.txt < prev   
Encoding:
Text File  |  1995-06-28  |  2.2 KB  |  46 lines

  1. README for lpansi.c                             12/2/1993
  2. File: lpansi.c                                 Author: Gary Day  
  3.                                gday@comp.uark.edu
  4.  
  5. The problem:  UNIX supplies a printing program called lp <filename> which 
  6.           allows the user to print a text (or any really) file to a 
  7.           printer.  Unfortunately, that printer is attached to the UNIX 
  8.           server which is not where the user usually is.  In my case, it is 
  9.           about 230 miles away.  I needed a similar program that would 
  10.           allow me to print to my home printer.  
  11.  
  12. The solution: The VT100 standard defines a printer on and off escape 
  13.           sequence.  [FYI: esc[5i is printer on, esc[4i is printer off.]
  14.           Lpansi is a VERY simple program that issues a printer on 
  15.           sequence, opens the file sent as an argument, reads it character
  16.           by character, echos it to stdout (now your local printer) and
  17.           ends by sending a form feed and printer off command.
  18.  
  19. Usage:  I had several purposes in mind when I wrote this.  The first was to
  20.     find a way to replace lp in a gopher client I had with something that
  21.     would print at home.  I also wanted to be able to print text 
  22.     files to my home printer directly from the UNIX prompt.  A 
  23.     natural extension of this is to add it to LYNX, and other printing
  24.     clients as your printer command.
  25.  
  26. Syntax:    lpansi <filename>
  27.     This program only accepts one filename as an argument, and not 
  28.     command line options.  It could be easily modified to accept more
  29.     but that will be up to you to do.  It serves my needs.  
  30.  
  31. Thanks: Thanks go to Michael Seibel on the PINE development team for 
  32.     helping me find the correct ANSI codes to turn off the printer.  
  33.     I found out later that PINE distributes a similar program called 
  34.     ansiprt which is supposed to do the same thing.  Here, the source
  35.     code is provided so you may incorporate the concept directly in your
  36.     program.
  37.  
  38. Disclaimer:  [Everyone has one so...] I make no promises whatsoever about 
  39.          how this will work for you.  If you have VT100 and/or ANSI, it
  40.          should work just fine.  If it doesn't, quit using it.  :)  This
  41.          program is free to use and modify, but try to keep my name with
  42.          it.  I don't do that much cool stuff, so I need all the credit
  43.          I can get.  Thanks.
  44.  
  45.               *** End of README for lpansi.c ***
  46.